package com.linkage.bss.crm.packagemgr.smo;

import java.io.Serializable;
import java.util.List;

import com.linkage.bss.commons.dao.Page;
import com.linkage.bss.commons.exception.SmoException;
import com.linkage.bss.crm.packagemgr.model.Area;
import com.linkage.bss.crm.packagemgr.model.Channel;
import com.linkage.bss.crm.packagemgr.model.CheckResult;

/**
 *
 * 包状态管理SMO
 *
 * @author  olns
 * @version  [版本号, 2013-4-28]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public interface IPackageStatusSMO extends Serializable {

	/**
	 * 包发布
	 * @param packageID
	 * @param areaList
	 * @param channlList
	 *
	 * @exception throws [违例类型] [违例说明]
	 * @see [类、类#方法、类#成员]
	 */
	public CheckResult publishPackage(Long packageID, List<Integer> areaList, List<Integer> channelList, Long staffID)
					throws SmoException;

	public void stopUsePackage(Long packageId, Long staffID) throws SmoException;

	public void startUsePackage(Long packageId, Long staffID) throws SmoException;

	/**
	 * 查询包发布地区
	 * @param pakcageId
	 */
	public List<Area> queryPackage2Area(Long packageId);

	/**
	 * 根据地区名称获取地区
	 * @param name
	 * @return
	 */
	public List<Area> getAreaByName(String name, Integer areaID, Page page);

	/**
	 * 根据地区名称查询符合条件的地区数量
	 * @param name
	 * @return
	 */
	public int getAreaCountByName(String name, Integer areaId);

	/**
	 *根据地区和名称查询渠道
	* getChannelByName
	*  @param map
	*  @return
	 */
	public List<Channel> getChannelByName(String channelName, Integer mangerAreaID, Page page);

	/**
	 * 查询渠道数量
	* getChannelByNameCount
	*  @param map
	*  @return
	 */
	public int getChannelByNameCount(String channelName, Integer mangerAreaID);

	public List<Channel> queryPackage2Channel(Long packageId);
}
